package com.xc.quickstart.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xc.quickstart.infrastructure.ds.DataSource;
import com.xc.quickstart.infrastructure.ds.DataSourceEnum;
import com.xc.quickstart.mapper.entity.CrmAdminENT;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 团队成员信息表 Mapper 接口
 * </p>
 *
 * @author code generator
 * @since 2020-12-23
 */
@Repository
@DataSource(DataSourceEnum.TCPOI_WRITE)
public interface CrmAdminMapper extends BaseMapper<CrmAdminENT> {


    @DataSource(DataSourceEnum.TCPOI_READ)
    @Select(" select * from xc_crm_admin where dept_id=#{departmentId} and is_valid=1")
    List<CrmAdminENT> list(@Param("departmentId") Integer departmentId);
}
